import request from '@/utils/request'

// 查询优惠券列表
export function listReceive(query) {
  return request({
    url: '/system/receive/list',
    method: 'get',
    params: query
  })
}

// 查询优惠券详细
export function getReceive(id) {
  return request({
    url: '/system/receive/' + id,
    method: 'get'
  })
}

// 新增优惠券
export function addReceive(data) {
  return request({
    url: '/system/receive',
    method: 'post',
    data: data
  })
}

// 修改优惠券
export function updateReceive(data) {
  return request({
    url: '/system/receive',
    method: 'put',
    data: data
  })
}

// 删除优惠券
export function delReceive(id) {
  return request({
    url: '/system/receive/' + id,
    method: 'delete'
  })
}
